var e = require, t = module, n = exports;

Object.defineProperty(n, "__esModule", {
    value: !0
}), n.ActivityManager = n.ActivityType = void 0, function(t) {
    t[t.DIAMOND = 0] = "DIAMOND", t[t.PIECE = 1] = "PIECE", t[t.CHRISTMAS = 2] = "CHRISTMAS", 
    t[t.NEWYEAR = 3] = "NEWYEAR", t[t.SNOW = 4] = "SNOW", t[t.NEWACTIVITY = 5] = "NEWACTIVITY", 
    t[t.FIRST = 6] = "FIRST", t[t.SECOND = 7] = "SECOND", t[t.THIRD = 8] = "THIRD", 
    t[t.FOURTH = 9] = "FOURTH", t[t.FIFTH = 10] = "FIFTH", t[t.SISTH = 11] = "SISTH", 
    t[t.SEVENTH = 12] = "SEVENTH";
}(n.ActivityType || (n.ActivityType = {}));

var o = function() {
    function t() {
        this.activityConfigMap = new Map();
    }
    return t.getInstance = function() {
        return this._manager || (this._manager = new t()), this._manager;
    }, t.prototype.checkActivity = function(t) {
        var e = this.activityConfigMap;
        if (!e.has(t)) return !1;
        t = e.get(t);
        if (!t.flag) return !1;
        try {
            if (t.time) {
                var n = t.time.split("~"), i = n[0].split("-").map(function(t) {
                    return parseInt(t);
                }), r = n[1].split("-").map(function(t) {
                    return parseInt(t);
                }), a = new Date(i[0], i[1] - 1, i[2]).getTime(), T = new Date(r[0], r[1] - 1, r[2]).getTime();
                if (Date.now() < a || Date.now() > T) return !1;
            }
        } catch (t) {
            return !0;
        }
        return !0;
    }, t._manager = null, t;
}();

n.ActivityManager = o;